package cn.mzy.feign;

import cn.mzy.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Package: cn.mzy.feign
 * @ClassName: UserServer
 * @Date:2022/11/9 10:56
 * @Description:
 */
// 被调用服务的服务名
@FeignClient(name = "user-server", fallbackFactory = UserServiceFallbackFactory.class)
public interface UserService {
    @GetMapping("/user/{id}")
    User getUserById(@PathVariable("id") Long id);
}
